# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=python-anytree
pkgver=2.8.0
pkgrel=6
pkgdesc="Powerful and Lightweight Python Tree Data Structure"
url="https://anytree.readthedocs.io/"
arch=(any)
license=(Apache)
depends=(python-six)
makedepends=(python-setuptools git)
_commit=75c0198636f8997967ba00df5077cd21350f68ce  # tags/2.8.0
source=("$pkgname::git+https://github.com/c0fec0de/anytree#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^v//;s/-/+/g'
}

build() {
  cd $pkgname
  python setup.py build
}

package() {
  cd $pkgname
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
  rm "$pkgdir/usr/LICENSE"
}
